
<div class="col-lg-12" id="container-button-save">
    <div id="main_button" class="btn btn-danger">Lưu Dữ Liệu</div>
    <h1 class="page-header">Tin Tức</h1>
    
</div>
<br/>

<div class="col-lg-12">
    

    <ul id="myTab" class="nav nav-tabs">
        <li class="active"><a href="#home" class="h_item_tab" >Thông tin chung</a></li>
        <li class=""><a href="#seo" class="h_item_tab" >SEO</a></li>
        <li class=""><a href="#profile" class="h_item_tab" >Banner</a></li>

    </ul>
    <div id="myTabContent" class="tab-content h_tab_content well">
        <?php
        $form = $this->beginWidget('booster.widgets.TbActiveForm', array('htmlOptions' => array('id' => 'h_main_form', 'enctype' => 'multipart/form-data')));
        ?>
        <div class="tab-pane active" id="home">
            <p>

                <?php
                echo $form->textFieldGroup($model, 'title');
                echo $form->dropDownListGroup(
                        $model, 'taxonomy_id', array(
                            'widgetOptions' => array(
                                'data' => Taxonomy::getListTaxonomy(ROOT_CATEGORY),
                            )
                        )
                );
                echo $form->textFieldGroup($model, 'order');
                echo $form->fileFieldGroup($model, 'image');
                ?>
                <?php
                if ($model->getImage() !== false) {
                    echo "<img src='" . urlImageFolder('news') . $model->getImage() . "' height='100' />";
                }
                ?>
                
                <br/>
                <?php echo $form->textAreaGroup(
			$model,
			'short_description',
			array(
				'wrapperHtmlOptions' => array(
					'class' => 'col-sm-5',
				),
				'widgetOptions' => array(
					'htmlOptions' => array('rows' => 5),
				)
			)
		); ?>
                <br/>
                <div id="container_editor">
                    <div id="content_editor">
                        <?php
                        $this->widget('ext.tinymce.TinyMce', array(
                            'model' => $model,
                            'attribute' => 'description',
                            'fileManager' => array(
                                'class' => 'ext.elFinder.TinyMceElFinder',
                                'connectorRoute' => 'filemanager/connector',
                            ),
                            'htmlOptions' => array(
                                'rows' => 6,
                                'cols' => 90,
                            )
                        ));
                        ?>
                        </div>
                    <div id="cover_editor"></div>
                </div>
                <div id="show_editor" class="btn btn-success">Viết Mô Tả</div>
                
            </p>
        </div>
        <div class="tab-pane h_hide" id="seo">
            <p>
                <?php
                    echo $form->textFieldGroup($model, 'seo_title');
                    echo $form->textFieldGroup($model, 'seo_keywork');
                    echo $form->textFieldGroup($model, 'seo_description');
                ?>
            </p>
        </div>
        <?php
        $this->endWidget();
        unset($form);
        ?>
        <div class="tab-pane h_hide" id="profile">
            <p>
                <?php
                if (isset($model->news_id) && $model->news_id)
                    $this->widget('BannerWidget', array('type' => BANNER_NEWS, 'object' => $model->news_id));
                else
                    echo "<div class='alert'>Bạn phải lưu bản tin trước khi thêm banner</div>";
                ?>   
            </p>
        </div>

    </div>


</div>
<script>
    
</script>